
<template>
  <BhOption :class="{ shadow: props.shadow }">
    <BhOptionItem label="重命名"  v-permission="['sys:file:rename']" @click="onClickItem('rename')"> </BhOptionItem>
    <BhOptionItem label="详情"  v-permission="['sys:file:info']" @click="onClickItem('detail')"> </BhOptionItem>
    <BhOptionItem label="下载"  v-permission="['sys:file:download']"@click="onClickItem('download')"></BhOptionItem>
    <BhOptionItem label="删除"  v-permission="['sys:file:delete']" @click="onClickItem('delete')"> </BhOptionItem>
  </BhOption>
</template>
<script setup lang="ts">
import type { QueryResponse } from '@/api/system/file'
interface Props {
  data?: QueryResponse
  shadow?: boolean
}

const props = withDefaults(defineProps<Props>(), {
  shadow: true,
})

const emit = defineEmits<{
  (e: 'click', mode: string): void
}>()

const onClickItem = (mode: string) => {
  emit('click', mode)
}

</script>


<style scoped lang="less">
.shadow {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border-2);
  box-sizing: border-box;
  background: var(--color-bg-popup);
}
</style>